3.26 \(\int (c+d x) (a+b \sec (e+f x)) \, dx\)

Optimal. Leaf size=93 \[ \frac{i b d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac{i b d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}+\frac{a (c+d x)^2}{2 d}-\frac{2 i b (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f} \]

[Out]

(a*(c + d*x)^2)/(2*d) - ((2*I)*b*(c + d*x)*ArcTan[E^(I*(e + f*x))])/f + (I*b*d*PolyLog[2, (-I)*E^(I*(e + f*x))
])/f^2 - (I*b*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2

________________________________________________________________________________________

Rubi [A]  time = 0.0708628, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4190, 4181, 2279, 2391} \[ \frac{i b d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac{i b d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}+\frac{a (c+d x)^2}{2 d}-\frac{2 i b (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + b*Sec[e + f*x]),x]

[Out]

(a*(c + d*x)^2)/(2*d) - ((2*I)*b*(c + d*x)*ArcTan[E^(I*(e + f*x))])/f + (I*b*d*PolyLog[2, (-I)*E^(I*(e + f*x))
])/f^2 - (I*b*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2

Rule 4190

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int (c+d x) (a+b \sec (e+f x)) \, dx &=\int (a (c+d x)+b (c+d x) \sec (e+f x)) \, dx\\ &=\frac{a (c+d x)^2}{2 d}+b \int (c+d x) \sec (e+f x) \, dx\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i b (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}-\frac{(b d) \int \log \left (1-i e^{i (e+f x)}\right ) \, dx}{f}+\frac{(b d) \int \log \left (1+i e^{i (e+f x)}\right ) \, dx}{f}\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i b (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{(i b d) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2}-\frac{(i b d) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2}\\ &=\frac{a (c+d x)^2}{2 d}-\frac{2 i b (c+d x) \tan ^{-1}\left (e^{i (e+f x)}\right )}{f}+\frac{i b d \text{Li}_2\left (-i e^{i (e+f x)}\right )}{f^2}-\frac{i b d \text{Li}_2\left (i e^{i (e+f x)}\right )}{f^2}\\ \end{align*}

Mathematica [A]  time = 0.0126583, size = 104, normalized size = 1.12 \[ \frac{i b d \text{PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac{i b d \text{PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}+a c x+\frac{1}{2} a d x^2+\frac{b c \tanh ^{-1}(\sin (e+f x))}{f}-\frac{2 i b d x \tan ^{-1}\left (e^{i e+i f x}\right )}{f} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(c + d*x)*(a + b*Sec[e + f*x]),x]

[Out]

a*c*x + (a*d*x^2)/2 - ((2*I)*b*d*x*ArcTan[E^(I*e + I*f*x)])/f + (b*c*ArcTanh[Sin[e + f*x]])/f + (I*b*d*PolyLog
[2, (-I)*E^(I*(e + f*x))])/f^2 - (I*b*d*PolyLog[2, I*E^(I*(e + f*x))])/f^2

________________________________________________________________________________________

Maple [B]  time = 0.072, size = 186, normalized size = 2. \begin{align*}{\frac{ad{x}^{2}}{2}}+acx-{\frac{2\,ibc\arctan \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{f}}-{\frac{bd\ln \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) x}{f}}-{\frac{bd\ln \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) e}{{f}^{2}}}+{\frac{bd\ln \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) x}{f}}+{\frac{bd\ln \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) e}{{f}^{2}}}+{\frac{ibd{\it dilog} \left ( 1+i{{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}-{\frac{ibd{\it dilog} \left ( 1-i{{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}+{\frac{2\,ibde\arctan \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+b*sec(f*x+e)),x)

[Out]

1/2*a*d*x^2+a*c*x-2*I*b/f*c*arctan(exp(I*(f*x+e)))-b/f*d*ln(1+I*exp(I*(f*x+e)))*x-b/f^2*d*ln(1+I*exp(I*(f*x+e)
))*e+b/f*d*ln(1-I*exp(I*(f*x+e)))*x+b/f^2*d*ln(1-I*exp(I*(f*x+e)))*e+I*b/f^2*d*dilog(1+I*exp(I*(f*x+e)))-I*b/f
^2*d*dilog(1-I*exp(I*(f*x+e)))+2*I*b/f^2*d*e*arctan(exp(I*(f*x+e)))

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*sec(f*x+e)),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [B]  time = 1.97448, size = 927, normalized size = 9.97 \begin{align*} \frac{a d f^{2} x^{2} + 2 \, a c f^{2} x - i \, b d{\rm Li}_2\left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) - i \, b d{\rm Li}_2\left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) + i \, b d{\rm Li}_2\left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) + i \, b d{\rm Li}_2\left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) -{\left (b d e - b c f\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) +{\left (b d e - b c f\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right ) +{\left (b d f x + b d e\right )} \log \left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) -{\left (b d f x + b d e\right )} \log \left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) +{\left (b d f x + b d e\right )} \log \left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) -{\left (b d f x + b d e\right )} \log \left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) -{\left (b d e - b c f\right )} \log \left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) +{\left (b d e - b c f\right )} \log \left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right )}{2 \, f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(a*d*f^2*x^2 + 2*a*c*f^2*x - I*b*d*dilog(I*cos(f*x + e) + sin(f*x + e)) - I*b*d*dilog(I*cos(f*x + e) - sin
(f*x + e)) + I*b*d*dilog(-I*cos(f*x + e) + sin(f*x + e)) + I*b*d*dilog(-I*cos(f*x + e) - sin(f*x + e)) - (b*d*
e - b*c*f)*log(cos(f*x + e) + I*sin(f*x + e) + I) + (b*d*e - b*c*f)*log(cos(f*x + e) - I*sin(f*x + e) + I) + (
b*d*f*x + b*d*e)*log(I*cos(f*x + e) + sin(f*x + e) + 1) - (b*d*f*x + b*d*e)*log(I*cos(f*x + e) - sin(f*x + e)
+ 1) + (b*d*f*x + b*d*e)*log(-I*cos(f*x + e) + sin(f*x + e) + 1) - (b*d*f*x + b*d*e)*log(-I*cos(f*x + e) - sin
(f*x + e) + 1) - (b*d*e - b*c*f)*log(-cos(f*x + e) + I*sin(f*x + e) + I) + (b*d*e - b*c*f)*log(-cos(f*x + e) -
 I*sin(f*x + e) + I))/f^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*sec(f*x+e)),x)

[Out]

Integral((a + b*sec(e + f*x))*(c + d*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}{\left (b \sec \left (f x + e\right ) + a\right )}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*sec(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*sec(f*x + e) + a), x)